I had just replied to a post of yours on TMT , but you could use the same method i think ,
This is untested but i think is along the lines of what needs to be done, you might have to adjust the vector_within radius to suit your needs
Code:
port6:
level.dest = makeArray
" 0 4973 254.46 "
" -134 6271 317.21 "
" 777 6541 351.12 "
" 900 7612 325.80 "
" 2240 7217 320.13 "
endArray
level.face = makeArray
" 0 90 0 "
" 0 -73 0 "
" 0 102 0 "
" 0 -114 0 "
" 0 164 0 "
endArray
local.fx = spawn script_model model "fx/corona_red.tik"
local.fx.origin = ( 0 4746 322 )
local.fx notsolid
local.fx.scale = 2
local.trig = spawn trigger_use
local.trig.origin = local.fx.origin
local.trig setsize ( -10 -10 -10 ) ( 10 10 10 )
local.num = 1
while(1)
{
local.trig waitTill trigger
local.fx hide
local.player = parm.other
///Loops through until the player is teleported
while(local.player.teleported != 1)
{
//Resets occupied status
local.tele_occupied = 0
//loops all players,
for(local.i = 1; local.i <= $player.size;i++)
{
local.person = $player[local.i]
///Checks if destination is occupied by a player , if it is , then sets local.tele_occupied = 1
if(vector_within level.dest[local.num][1] local.person.origin 25) // adjust radius if needed
local.tele_occupied = 1
}
//If occupied, then skips to next destination
if(local.tele_occupided == 1)
{
local.num ++
//Double check we dnt go over limit
if(local.num > level.dest.size && local.num > level.face.size)
local.num = 1
}
else
{
/// If not occupied, teleports player
local.player tele level.dest[local.num][1]
local.player face level.face[local.num][1]
local.player.teleported = 1
if(getcvar "hammer" == "1")
{
exec global/spawnhandler.scr::hammer local.player
local.player iprint "You have HAMMER ONLY behind this gate!" 1
local.player.name = netname local.player
iprintln ("Basher '" + local.player.name + "' has just entered the Bashing-Area!")
}
break;
}
}
local.num ++
if(local.num > level.dest.size && local.num > level.face.size)
local.num = 1
wait 2
local.fx show
}
end